Image coding method, image decoding method, image coding apparatus, and image decoding apparatus

ABSTRACT

According to an embodiment, an image coding method is for coding an image including a luminance component and color difference components. The method includes acquiring a reference image; and generating a predicted image by interpolating the luminance component and the color difference components in the reference image according to a motion vector. If a size of a block, which is designated as a unit of the interpolation, is equal to or smaller than a predetermined first threshold value, the generating includes inhibiting a bi-directional prediction, and performing only a uni-directional prediction to generate the predicted image according to the motion vector.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.14/026,465, filed on Sep. 13, 2013, which is a continuation of PCTinternational application serial no. PCT/JP2011/075725, filed on Nov. 8,2011 which designates the United States, the entire contents of each ofwhich are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to an image coding method,an image decoding method, an image coding apparatus, and an imagedecoding apparatus.

BACKGROUND

In a technique of video coding and decoding, a motion-compensatedinterpolation for each block is generally executed. An image signal tobe referred is stored in an external memory; therefore, when the videocoding and decoding is implemented by hardware, there might beconstraints on the amount of read data. Accordingly, when an amount ofaccess to the memory increases, a so-called memory bandwidth, which is abottleneck in the coding and decoding operations, becomes a problem.

In the motion-compensated interpolation for each block, an interpolationfiltering process using FIR (Finite Impulse Response) filter in thehorizontal direction and in the vertical direction is executed. In theinterpolation filtering process, a pixel outside the block has to beaccessed. When the number of pixels outside the block increases, thememory bandwidth per pixel also increases.

Conventionally, the memory bandwidth per pixel has been reduced byapplying an interpolation filter with a short tap length to a block witha small size by which the ratio of the accessed pixels outside the blockrelatively increases.

However, in the conventional art, the memory bandwidth cannotappropriately be reduced. For example, in the case of the chroma format,such as 4:2:0 or 4:2:2, in which the number of samples of the pixel fora color difference (color difference component) is smaller than thenumber of samples of the pixel for luminance (luminance component), andthe resolution is low, the interpolation has to be executed in such amanner that the color difference is enlarged more with the luminancebeing defined as a reference. Therefore, when the filter with tapslonger than two taps is used for the interpolation for the colordifference, the process for the color difference signal cannot berestricted, even if the process is changed per luminance block.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an image coding apparatusaccording to an embodiment;

FIG. 2 is a view illustrating one example of chroma format information;

FIG. 3 is a view of a motion vector with a color difference signal in4:2:0 format;

FIG. 4 is a view of a motion vector with a luminance signal in 4:2:0format;

FIG. 5 is a view of a motion vector with a color difference signal in4:2:2 format;

FIG. 6 is a view of a motion vector with a luminance signal in 4:2:2format;

FIG. 7 is a view illustrating an example of pixels that are accessed in4:2:0 format;

FIG. 8 is a view illustrating an example of pixels that are accessed in4:2:0 format;

FIG. 9 is a view illustrating an example of pixels that are accessed in4:2:2 format;

FIG. 10 is a block diagram illustrating an image decoding apparatuscorresponding to the image coding apparatus;

FIG. 11 is a block diagram illustrating a predicted image generatingunit;

FIG. 12 is a flowchart of control according to the embodiment;

FIG. 13 is a flowchart of a process of reducing a memory bandwidth;

FIG. 14 is a flowchart of a process of reducing a memory bandwidth;

FIG. 15 is a flowchart of a process of reducing a memory bandwidth; and

FIG. 16 is a diagram illustrating a hardware configuration of theapparatus according to the embodiment.

DETAILED DESCRIPTION

According to an embodiment, an image coding method is for coding animage including a luminance component and two color differencecomponents. The method includes acquiring a reference image; andgenerating a predicted image by interpolating the luminance componentand the two color difference components in the reference image accordingto a motion vector. When a size of a block, which is designated as aunit of the interpolation, is equal to or smaller than a predeterminedfirst threshold value, the generating includes inhibiting abi-directional prediction, and performing only a uni-directionalprediction to generate the predicted image according to the motionvector.

Embodiments will be described below in detail with reference to theaccompanying drawings.

The image coding apparatus and the image decoding apparatus according tothe present embodiment make a control by referring to chroma formatinformation so that a position of a pixel indicated by a motion vectorin a block having a size smaller than a predetermined size is notsubject to an interpolation for a color difference, thereby reducing amemory bandwidth.

FIG. 1 is a block diagram illustrating one example of a configuration ofan image coding apparatus 100 according to the present embodiment. Asillustrated in FIG. 1, the image coding apparatus 100 includes asubtraction unit 102, a transformation/quantization unit 103, an inversequantization/inverse transformation unit 104, an entropy coding unit105, an addition unit 106, a frame memory 108, a predicted imagegenerating unit 110, a prediction control unit 112, a coding controlunit 113, and a motion vector search unit 116.

The image coding apparatus 100 generates coded data 120 from input videosignal 101. For example, the input video signal 101 is input to theimage coding apparatus 100 in units o frames. The input video signal 101is divided into a block that is a macroblock.

The subtraction unit 102 outputs a prediction error signal that is adifference between a predicted image signal 111 generated by thepredicted image generating unit 110 and the input video signal 101.

The transformation/quantization unit 103 executes a quantization afterexecuting an orthogonal transformation on prediction error signal with adiscrete cosine transformation (DCT), thereby generating quantizedtransform coefficient information. The quantized transform coefficientinformation is divided into two. One of the divided information is inputto the entropy coding unit 105. The other one is input to the inversequantization/inverse transformation unit 104.

The inverse quantization/inverse transformation unit 104 executes theinverse quantization and inverse transformation on the quantizedtransform coefficient information as the process inverse to theprocessing executed by the transformation/quantization unit 103, therebyreproducing the prediction error signal.

The addition unit 106 adds the prediction error signal and the predictedimage signal. According to this process, a decoded image signal 107 isgenerated. The decoded image signal 107 is input to the frame memory108.

The frame memory 108 is a memory unit that stores therein a referenceimage signal. The frame memory 108 executes a filtering process or theother process on the decoded image signal 107, and then, determineswhether the decoded image signal 107 is stored or not for allowing thedecoded image signal 107 to become the reference image signal 109 inputto the predicted image generating unit 110. The reference image signal109 is input to the predicted image generating unit 110 and to themotion vector search unit 116.

The motion vector search unit 116 generates motion vector information117 from the input video signal 101 and the reference image signal 109.The motion vector information 117 is input to the predicted imagegenerating unit 110, and also transmitted to the entropy coding unit105.

The predicted image generating unit 110 generates the predicted imagesignal 111 from the reference image signal 109, the prediction controlinformation 118, and the motion vector information 117.

The coding control unit 113 inputs block size restriction information115 to the prediction control unit 112, and transmits profile/levelinformation 119 to the entropy coding unit 105.

The profile/level information 119 includes profile informationindicating a combination of coding tool groups, and level informationthat is restriction information of the image coding apparatus accordingto the processing power of the image decoding apparatus. The levelinformation indicates a restriction combination of a maximum number ofmacroblocks per hour, the maximum number of macroblocks per frame, themaximum search range of vector, and the number of vectors in twoconsecutive macroblocks.

For example, H.264 specifies profile information such as a base lineprofile, a main profile, and high profile. H.264 also specifies 16 levelinformation.

In the present embodiment, parameters are specified using theprofile/level information. The parameters includes a parameterspecifying as to whether the memory bandwidth reducing method is appliedor not, the restriction value of the block size (block size restrictioninformation 115), and a restriction method. These parameters may bespecified by using information other than the profile/level information.

The block size restriction information 115 is information specifying athreshold value (the restriction value of the block size) used for thedetermination of the block size. For example, the coding control unit113 sets different block size restriction information 115 according tothe profile/level information. The block size restriction information115 may be included in the profile/level information.

The prediction control unit 112 controls the predicted image generationexecuted by the predicted image generating unit 110 according to theblock size restriction information 115 input from the coding controlunit 113, chroma format information 114 of the input video signal 101,and the motion vector information 117 input from the motion vectorsearch unit 116 (the detail will be described later). The predictioncontrol unit 112 generates the prediction control information 118 usedfor the control of the predicted image generation. The predictioncontrol information 118 is input to the predicted image generating unit110, and also transmitted to the entropy coding unit 105.

The entropy coding unit 105 performs an entropy coding on the codinginformation to generate the coded data 120 according to a prescribedsyntax. The coding information includes, for example, the quantizedtransform coefficient information input from thetransformation/quantization unit 103, the chroma format information 114of the input video signal, the motion vector information 117 input fromthe motion vector search unit 116, the prediction control information118 input from the prediction control unit 112, and the profile/levelinformation 119 input from the coding control unit 113.

Here, the chroma format information 114 will be described. The chromaformat information 114 is information indicating a chroma format of theinput video signal 101. FIG. 2 is a view illustrating one example of thechroma format information 114. FIG. 2 illustrates an example in whichchroma_format_idc used in H.264 is used as the chroma format information114.

chroma_format_idc=0 indicates a monochrome format only with luminance.chroma_format_idc=1 indicates 4:2:0 format in which the color differenceis sampled at half horizontally and vertically with respect to theluminance. chroma_format_idc=2 indicates 4:2:2 format in which the colordifference is sampled at half only horizontally with respect to theluminance. chroma_format_idc=3 indicates 4:4:4 format in which theluminance and the color difference have the same pixel number.

The horizontal size of the prediction block of the luminance signal isdefined as nPSW, and the vertical size is defined as nPSH. In 4:2:0format, the horizontal size of the blocks of the color differencesignals Cb and Cr is nPSW/2, while the vertical size is nPSH/2. In 4:2:2format, the horizontal size of the blocks of the color differencesignals Cb and Cr is nPSW/2, while the vertical size is nPSH. In 4:4:4format, the horizontal size of the blocks of the color differencesignals Cb and Cr is nPSW, while the vertical size is nPSH.

Next, the relationship between the chroma format and the interpolationwill be described.

FIG. 3 is a view illustrating the position of the motion vector in aninterpolation image with ⅛-pel accuracy of the color difference signalin 4:2:0 format. “B” is a position of an integer pixel of the colordifference signal, which is the position of the motion vector that doesnot need the interpolation. White portions indicate the position of themotion vector that needs a one-dimensional interpolation for the colordifference signal only horizontally or only vertically. Light shadedportions indicate the position of the motion vector that needs atwo-dimensional interpolation for performing the interpolation to thecolor difference signal both horizontally and vertically.

FIG. 4 is a view illustrating the position of the motion vector in aninterpolation image with ¼-pel accuracy of the luminance signal in 4:2:0format. “A” is the position of the integer pixel of the luminancesignal, which is the position of the motion vector that does not needthe interpolation. White portions with “A” indicate the position of themotion vector that does not need the interpolation for both theluminance signal and the color difference signal. Light shaded portionswith “A” indicate the position of the motion vector that does not needthe interpolation for the luminance signal but needs the interpolationfor the color difference signal.

The white portions without “A” indicate the position of the motionvector that needs the one-dimensional interpolation for the luminancesignal and the color difference signal only horizontally or onlyvertically. The light shaded portions without “A” indicate the positionof the motion vector that needs the two-dimensional interpolation inwhich the interpolation processing is performed horizontally andvertically for the luminance signal and the color difference signal.Dark shaded portions indicate the position of the motion vector thatneeds the one-dimensional interpolation only horizontally or onlyvertically for the luminance signal, and needs the two-dimensionalinterpolation in which the interpolation is executed horizontally andvertically for the color difference signal.

FIG. 5 is a view illustrating the position of the motion vector in aninterpolation image with ¼-pel accuracy of the color difference signalin the horizontal direction, and with ⅛-pel accuracy of the colordifference signal in the vertical direction in 4:2:2 format. “B” is theposition of the integer pixel of the color difference signal, which isthe position of the motion vector that does not need the interpolation.White portions indicate the position of the motion vector that needs theone-dimensional interpolation for the color difference signal onlyhorizontally or only vertically. Light shaded portions indicate theposition of the motion vector that needs the two-dimensionalinterpolation for performing the interpolation to the color differencesignal horizontally and vertically.

FIG. 6 is a view illustrating the position of the motion vector in aninterpolation image with ¼-pel accuracy of the luminance signal in 4:2:2format. “A” is the position of the integer pixel of the luminancesignal, which is the position of the motion vector that does not needthe interpolation for the luminance signal. White portions with “A”indicate the position of the motion vector that does not need theinterpolation for both the luminance signal and the color differencesignal. Light shaded portions with “A” indicate the position of themotion vector that does not need the interpolation for the luminancesignal but needs the interpolation for the color difference signal.

The white portions without “A” indicate the position of the motionvector that needs the one-dimensional interpolation for the luminancesignal and the color difference signal only horizontally or onlyvertically. The light shaded portions without “A” indicate the positionof the motion vector that needs the two-dimensional interpolation inwhich the interpolation is performed horizontally and vertically for theluminance signal and the color difference signal. Dark shaded portionsindicate the position of the motion vector that needs theone-dimensional interpolation only horizontally for the luminancesignal, and needs the two-dimensional interpolation in which theinterpolation is executed horizontally and vertically for the colordifference signal.

Next, the relationship between the chroma format and the pixel to beaccessed in the interpolation will be described.

FIGS. 7 and 8 are views illustrating one example of a pixel that isaccessed upon generating the interpolation image on the block basis in4:2:0 format.

FIG. 7 illustrates the maximum number of pixels that have to be accessedupon generating the interpolation image of 4×4 pixel block for theluminance signal with an 8-tap interpolation filter. In thetwo-dimensional interpolation, three outside pixels on the left andabove the pixel block as well as four outside pixels on the right andunder the pixel block have to be accessed for generating theinterpolation image with 4×4 pixel block. Specifically, 11×11 pixelshave to be accessed as a whole. The number of the outside pixels to beaccessed depends upon the tap length. Therefore, when the interpolationfilter with the same tap is used, the number of accesses per pixelincreases more for a smaller block.

FIG. 8 illustrates the maximum number of pixels that have to be accessedupon generating the interpolation image of 2×2 pixel block,corresponding to 4×4 pixel block for the luminance signal, for the colordifference signal with a four-tap interpolation filter. In thetwo-dimensional interpolation, one outside pixel on the left and abovethe pixel block as well as two outside pixels on the right and under thepixel block have to be accessed for generating the interpolation imagewith 2×2 pixel block. Specifically, 5×5 pixels have to be accessed as awhole.

FIG. 9 is a view illustrating one example of a pixel that is accessedupon generating the interpolation image on the block basis in 4:2:2format. The maximum number of pixels that have to be accessed upongenerating the interpolation image of 4×4 pixel block for the luminancesignal with a four-tap interpolation filter is the same as the case inFIG. 7, so that the redundant description will not be made.

FIG. 9 illustrates the maximum number of pixels that have to be accessedupon generating the interpolation image of 4×2 pixel block,corresponding to 4×4 pixel block for the luminance signal, for the colordifference signal with a four-tap interpolation filter. In thetwo-dimensional interpolation, one outside pixel on the left and abovethe pixel block as well as two outside pixels on the right and under thepixel block have to be accessed for generating the interpolation imagewith 2×2 pixel block. Specifically, 5×7 pixels have to be accessed as awhole.

As illustrated in FIGS. 3 to 6, the necessity of the interpolation isdifferent depending upon the chroma format and the motion vector. Whichis needed out of the one-dimensional interpolation and thetwo-dimensional interpolation is different depending upon the chromaformat and the motion vector. As illustrated in FIGS. 7 to 9, the numberof pixels to be accessed is different depending upon the chroma format.

In the present embodiment, by referring to the chroma format and themotion vector, the predicted image generation is controlled so that aspecific interpolation in which the number of pixels to be accessed inthe reference image (reference image signal 109) is large is notexecuted. The specific interpolation is an interpolation usingbi-directional prediction and two-dimensional interpolation. Theinterpolation in the bi-directional prediction may be defined as thespecific interpolation. The specific method for controlling thepredicted image generation so as not to execute the specificinterpolation will be described later.

FIG. 10 is a block diagram illustrating an example of a configuration ofan image decoding apparatus 300 corresponding to the image codingapparatus 100. The image decoding apparatus 300 includes an entropydecoding unit 302, an inverse quantization/inverse transformation unit303, an addition unit 304, a frame memory 306, and the predicted imagegenerating unit 110.

The image decoding apparatus 300 generates a reproduced video signal 307from coded data 301.

The entropy decoding unit 302 performs an entropy decoding on the codeddata 301 in accordance with a prescribed syntax. The entropy decodingunit 302 decodes the coded data 301 to acquire quantized transformcoefficient information, prediction control information 311, motionvector information 312, and profile/level information 313. The decodedquantized transform coefficient information is input to the inversequantization/inverse transformation unit 303. The decoded predictioncontrol information 311, the motion vector information 312, and theprofile/level information 313 are input to the predicted imagegenerating unit 110.

The quantized transform coefficient information, the prediction controlinformation 311, the motion vector information 312, and theprofile/level information 313 correspond respectively to the quantizedtransform coefficient information, the prediction control information118, the motion vector information 117, and the profile/levelinformation 119, which are coded by the image coding apparatus 100 inFIG. 1.

The inverse quantization/inverse transformation unit 303 executesinverse quantization and inverse orthogonal transformation on thequantized transform coefficient information, thereby reproducing theprediction error signal.

The addition unit 304 adds the prediction error signal and the predictedimage signal 310 to generate a decoded image signal 305. The decodedimage signal 305 is input to the frame memory 306.

The frame memory 306 executes the filtering process on the decoded imagesignal 305, and outputs the resultant as the reproduced video signal307. The frame memory 306 determines whether the decoded image signal305, which has undergone the filtering process, is stored or not, basedupon the prediction control information 311. The stored decoded imagesignal 305 is input to the predicted image generating unit 110 as areference image signal 308.

The predicted image generating unit 110 generates the predicted imagesignal 310 by using the reference image signal 308, the predictioncontrol information 311, and the motion vector information 312.

FIG. 11 is a block diagram illustrating an example of a configuration ofthe predicted image generating unit 110 mounted to the image codingapparatus 100 and the image decoding apparatus 300. The predicted imagegenerating unit 110 includes a switch 201, a bi-directional predictionunit 202, a uni-directional prediction unit 203, and an intra-predictionunit 204. The predicted image generating unit 110 generates thepredicted image signal 111 from the reference image signal 109, theprediction control information 118, and the motion vector information117.

The prediction control information 118 includes information (predictionmode) for designating which one of the bi-directional prediction unit202, the uni-directional prediction unit 203, and the intra-predictionunit 204 is used, for example. The switch 201 makes a changeover forselecting any one of the bi-directional prediction unit 202, theuni-directional prediction unit 203, and the intra-prediction unit 204by referring to this information.

The reference image signal 109 is input to any one of the bi-directionalprediction unit 202, the uni-directional prediction unit 203, and theintra-prediction unit 204, which is selected by the switch 201.

When the bi-directional prediction unit 202 is selected, thebi-directional prediction unit 202 generates a motion compensation imagesignal by using the reference image signal 109 and the motion vectorinformation 117 from plural reference frames, and generates thepredicted image signal 111 based upon the bi-directional prediction. Thebi-directional prediction unit 202 is selected not only in the casewhere the prediction mode is explicitly designated as the bi-directionalprediction as the coded data but also in the case where thebi-directional prediction is not explicitly designated by the coded datasuch as a skip mode, a direct mode, and merge mode, but the operation ofthe bi-directional prediction is implicitly designated by semantics.

When the uni-directional prediction unit 203 is selected, theuni-directional prediction unit 203 generates the motion compensationimage signal by using the reference image signal 109 and the motionvector information 117 from a single reference frame, and generates thepredicted image signal 111. The uni-directional prediction unit 203 isselected not only in the case where the prediction mode is explicitlydesignated as the uni-directional prediction as the coded data but alsoin the case where the uni-directional prediction is not explicitlydesignated by the coded data such as the skip mode, the direct mode, andthe merge mode, but the operation of the uni-directional prediction isimplicitly designated by semantics.

When the intra-prediction unit 204 is selected, the intra-predictionunit 204 generates the predicted image signal 111 by using the referenceimage signal 109 in a screen.

Next, the control for reducing the memory bandwidth by the image codingapparatus 100 thus configured according to the present embodiment willbe described with reference to FIG. 12. FIG. 12 is a flowchartillustrating an overall flow of the control in the present embodiment.

The coding control unit 113 sets a restriction value (nLPSW, nLPSH) ofthe block size according to the profile/level information 119 (stepS101). nLPSW is the restriction value of the predicted block size ofluminance in the horizontal direction. nLPSH is the restriction value ofthe predicted block size of luminance in the vertical direction.

When the profile information indicates a specific profile (e.g., highprofile of H.264), or when the level information indicates a specificlevel (e.g., a certain level or higher level), for example, the codingcontrol unit 113 sets the predetermined restriction value (nLPSW, nLPSH)of the block size. The coding control unit 113 may be configured to setstepwise the restriction value of the block size according to theprofile information and the level information.

It is supposed below that a variable RW is a motion vector accuracy inthe horizontal direction, expressed by 1/RW-pel accuracy. It is alsosupposed that a variable RH is a motion vector accuracy in the verticaldirection, expressed by 1/RH-pel accuracy. Initial values of thevariable RW and the variable RH are defined as the motion vectoraccuracy of luminance. A value of a power of two is generally used forRW and RH.

The prediction control unit 112 determines whether the chroma formatinformation (chroma_format_idc) 114 is 1 or not (step S102). In the caseof chroma_format_idc=1 (step S102: Yes), the prediction control unit 112doubles the values of RW and RH (step S103). This is becausechroma_format_idc=1 means 4:2:0 format in which the color difference issampled at half horizontally and vertically with respect to luminance.

In the case where chroma_format_idc=1 is not established (step S102:No), the prediction control unit 112 determines whether the chromaformat information (chroma_format_idc) 114 is 2 or not (step S104). Inthe case of chroma_format_idc=2 (step S104: Yes), the prediction controlunit 112 doubles the value of RW (step S105). This is becausechroma_format_idc=2 means 4:2:2 format in which the color difference issampled at half only horizontally with respect to luminance.

When chroma_format_idc assumes other values (step S104: No), the valuesof RW and RH are not changed.

Next, the prediction control unit 112 calculates a variable L indicatingwhether the memory bandwidth is restricted or not (step S106). Thevariable L assuming “true” means that the method of reducing the memorybandwidth is applied, and the variable L assuming “false” means that themethod is not applied.

When the prediction is the bi-directional prediction, the predictionblock is small, and two motion vectors are fractional accuracy in thecolor difference, as described above for example, the memory bandwidthto be accessed per pixel increases. Therefore, the prediction controlunit 112 calculates the variable L according to the following equation(1).L=(PredMode==PredBi)&&(nPSW≦nLPSW)&&(nPSH≦nLPSH)&&(mvL0[0]&(RW−1))&&(mvL0[1]&(RH−1))&&(mvL1[0]&(RW−1))&&(mvL1[1]&(RH−1));  (1)

The value of the motion vector in the horizontal direction in the list 0of the block to be processed is defined as mvL0[0], and the value in thevertical direction is defined as mvL0[1]. The value of the motion vectorin the horizontal direction in the list 1 is defined as mvL1[0], and thevalue in the vertical direction is defined as mvL1[1]. PredModeindicates the prediction mode. PredBi indicates the bi-directionalprediction. In the description below, the prediction modes of theuni-directional prediction using the motion vectors in the list 0 and inthe list 1 are represented as PredL0 and PredL1, respectively.

An example of the equation (1) means a case in which the prediction modePredMode is PredBi, i.e., the bi-directional prediction unit 202 isselected. (nPSW≦nLPSW)&&(nPSH≦nLPSH) && means the condition in which theprediction block size is equal to or smaller than the block sizerestriction information. In (mvL0[0]&(RW−1))&&, (mvL0[1]&(RH−1))&&,(mvL1[0]&(RW−1))&&, and (mvL1[1]&(RH−1)), it is checked whether the twomotion vectors L0 and L1 are not subjected to the two-dimensionalinterpolation for the color difference, i.e., whether the lower bit ofthe motion vector expresses the accuracy after the decimal point. “&”means a bit operator according to the notation in the C language, andexpresses bitwise OR.

The conditional equation for calculating the variable L is not limitedto the equation (1). For example, it may independently be determinedeven for the prediction modes (PredL0, PredL1) other than PredBi as inan equation (2).L=(nPSW≦nLPSW)&&(nPSH≦nLPSH)&&((PredMode==PredBi)&&(mvL0[0]&(RW−1))&&(mvL0[1]&(RH−1))&&(mvL1[0]&(RW−1))&&(mvL1[1]&(RH−1))∥((PredMode==PredL0)&&(mvL0[0]&(RW−1))&&(mvL0[1]&(RH−1))∥((PredMode==PredL1)&&(mvL1[0]&(RW−1))&&(mvL1[1]&(RH−1)))));  (2)

As in an equation (3), the restriction value (nLPSW1, nLPSH1) of theblock size for the uni-directional prediction (PredL0 or PredL1) mayseparately be set. Specifically, the block size restricted in theuni-directional prediction and the block size restricted in thebi-directional prediction may be different from each other.L=((PredMode==PredBi)&&(nPSW≦nLPSW)&&(nPSH≦nLPSH)&&(mvL0[0]&(RW−1))&&(mvL0[1]&(RH−1))&&(mvL1[0]&(RW−1))&&(mvL1[1]&(RH−1))∥(((nPSW≦nLPSW1)&&(nPSH≦nLPSH1))∥((PredMode==PredL0)&&(mvL0[0]&(RW−1))&&(mvL0[1]&(RH−1))&&((PredMode==PredL1)&&(mvL1[0]&(RW−1))&&(mvL1[1]&(RH−1)));  (3)

When the prediction block size is equal to or smaller than therestriction value (nLPSW, nLPSH) of the block size as in an equation(4), two motion vectors may be restricted to access only to the integerpixel in the color difference during the bi-directional prediction.L=((PredMode==PredBi)&&(nPSW≦nLPSW)&&(nPSH≦nLPSH)&&!((mvL0[0]&(RW−1)==0)&&(mvL0[1]&(RH−1)==0)&&(mvL1[0]&(RW−1)==0)&&(mvL1[1]&(RH−1)==0)));  (4)

Whether the value of the motion vector is restricted, or under whatcondition the value of the motion vector is restricted is distinguishedby the profile/level information 119.

Next, the specific method of reducing the memory bandwidth will bedescribed. FIG. 13 is a flowchart illustrating one example of theprocess of reducing the memory bandwidth. FIG. 13 illustrates oneexample of a method of restricting the value of the motion vector, asthe method of reducing the memory bandwidth.

The prediction control unit 112 determines whether the variable L is“true” or not (step S201). If the variable L is “true” (step S201: Yes),the prediction control unit 112 transforms the values L0 and L1 of twomotion vectors as in an equation (5) (step S202).mvL0[0]=((mvL0[0]+(RW>>1))/RW)×RW;mvL0[1]=((mvL0[1]+(RH>>1))/RH)×RH;mvL1[0]=((mvL1[0]+(RW>>1))/RW)×RW;mvL1[1]=((mvL1[1]+(RH>>1))/RH)×RH;  (5)

“>>” indicates an arithmetic right shift according to the notation inthe C language. “/” indicates a division in integer arithmetic. “×”indicates a multiplication in integer arithmetic. The bit correspondingto the interpolation accuracy of the color difference signal of twomotion vectors L0 and L1 are rounded by the equation (5) to become 0.With this process, the two-dimensional interpolation is not executed,whereby the reduction in the memory bandwidth can be achieved.

The general rounding method is described here. However, the other methodmay be used. For example, rounding down method, rounding up method, anda method of rounding to the nearest even number may be employed.

The motion vector information 117 whose value is changed is coded in theentropy coding unit 105, and output as the coded data. The method inFIG. 13 is for controlling the motion vector information 117 byrestricting the value of the motion vector, so as not to generate thecoded data by which the memory bandwidth increases.

Alternatively, instead of coding the motion vector information 117 whosevalue is changed in the entropy coding unit 105, the motion vectorinformation 117 before the change may be coded by the entropy codingunit. In this case, the predicted image generating unit 110 in the imagedecoding apparatus 300 determines whether the method of reducing thememory bandwidth is applied or not in the process same as that in FIG.12. When it is applied, the predicted image generating unit 110 in theimage decoding apparatus 300 restricts the motion vector by the samemanner as in FIG. 13.

The method of transforming the value of the motion vector is not limitedto the method of rounding the value corresponding to the interpolationaccuracy of the color difference as in the equation (4). The value maybe rounded separately for the luminance and the color difference.Specifically, during the interpolation for the luminance, the valuecorresponding to the interpolation accuracy of the luminance may berounded, while the value corresponding to the interpolation accuracy ofthe color difference may be rounded during the interpolation processingfor the color difference. This method is for not generating thepredicted image that increases the memory bandwidth, when the imagecoding apparatus 100 and the image decoding apparatus 300 are configuredin advance in a manner to execute the same operation.

FIG. 14 is a flowchart illustrating another example of the process ofreducing the memory bandwidth. FIG. 14 illustrates another example ofthe method of restricting the value of the motion vector.

In this example, the prediction control unit 112 and the predicted imagegenerating unit 110 calculate cost for selecting the prediction mode,the predicted block size, and the motion vector. They preferentiallyselect the prediction mode, the predicted block size, and the motionvector, which are small in cost, whereby the optimum combination can beselected.

A variable MV_Cost indicating the cost for the motion vector iscalculated by using a sum of absolute distance (SAD) of predictedresidual errors, a code amount of the motion vector information(MV_Code), and a Lagrange multiplier (λ) calculated from the quantizedinformation as in an equation (6).MV_Cost=SAD+λ×MV_Code  (6)

If the variable L is “true” (step S301: Yes), the prediction controlunit 112 substitutes the predetermined maximum value MaxValue into thevariable MV_Cost indicating the cost for the motion vector (step S302).With this process, the prediction control unit 112 controls not toselect the motion vector having the large memory bandwidth (step S301).

In the method in FIG. 14, the value of the motion vector is restrictedto control the motion vector information 117, so as not to generate thecoded data by which the memory bandwidth increases, as in FIG. 13.

FIG. 15 is a flowchart illustrating another example of the method ofreducing the memory bandwidth. FIG. 15 illustrates a method ofcontrolling the prediction mode of the color difference, as anothermethod of reducing the memory bandwidth.

If the variable L is “true” (step S401), only the prediction modePredMode of color is forcibly rewritten to the uni-directionalprediction PredL0 (step S402). With this process, the case of thebi-directional prediction with the color difference signal using largememory bandwidth can be restricted.

The prediction mode in which the prediction mode is forcibly rewrittenmay be the uni-directional prediction PredL1. What prediction mode isrestricted is determined according to the profile/level information 119.

As described above, according to the present embodiment, the memorybandwidth upon generating the motion-compensated interpolation imageduring the image coding and image decoding can be reduced.

Next, a hardware configuration of the apparatus (the image codingapparatus, and the image decoding apparatus) according to the presentembodiment will be described with reference to FIG. 16. FIG. 16 is anexplanatory view illustrating a hardware configuration of the apparatusaccording to each of the embodiments. The image encoding apparatus andthe image decoding apparatus each comprise a control unit 2801, such asa CPU (Central Processing Unit) which controls the overall apparatus, amain storage 2802, such as a ROM (Read Only Memory) or a RAM (RandomAccess Memory) which stores various data or programs, an auxiliarystorage 2803, such as an HDD (Hard Disk Drive) or a CD (Compact Disk)drive which stores various data or programs, and a bus connecting theseelements. This is a hardware configuration utilizing a conventionalcomputer. Further, the image encoding apparatus and the image decodingapparatus are connected wirelessly or through a wire to a communicationI/F (Interface) 2804 which controls communication with an externalapparatus, a display 2805 which displays information, and an operatingunit 2806, such as a keyboard or a mouse which receives instructionsinput by the user. Data to be encoded and data to be decoded may bestored in the HDD, or input by the disk drive apparatus, or inputexternally via the communication I/F 2804.

The hardware configuration shown in FIG. 28 is a mere example. The imageencoding apparatus and the image decoding apparatus of each embodimentmay be implemented partly or entirely by an integrated circuit such asan LSI (Large Scale Integration) circuit or an IC (Integrated Circuit)chip set. The functional blocks of the image encoding apparatus and theimage decoding apparatus may be individually formed of a processor, ormay be integrated partly or entirely as a processor. Integration of thecircuits of the configuration is not limited to LSI, but may beimplemented as a dedicated circuit or a general-purpose processor.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. An image decoding method of decoding a targetimage including a luminance component and color difference components,the method comprising: acquiring a reference image; selecting abi-directional prediction or a uni-directional prediction based on aprediction mode that is explicitly or implicitly designated; if a sizeof a block, which is designated as a unit of an interpolation, is equalto or smaller than a first threshold value and if the bi-directionalprediction is selected, changing the bi-directional prediction to theuni-directional prediction; and generating a predicted image byinterpolating the luminance component and the color differencecomponents in the reference image according to a motion vector.
 2. Theimage decoding method according to claim 1, wherein in the generating,if the size of the block, which is designated as a unit of theinterpolation, is equal to or smaller than a second threshold value thatis different from the first threshold value, the uni-directionalprediction is not performed.
 3. The image decoding method according toclaim 1, wherein the predicted image is generated from two referenceimages if the bi-directional prediction is performed and generated froma single reference image if the uni-directional prediction is performed.4. An image decoding apparatus that decodes a target image including aluminance component and color difference components, the apparatuscomprising: a microprocessor that operates as: a decoding unitconfigured to acquire a transform coefficient and a motion vector bydecoding coded data; a first generating unit configured to generate apredicted image by interpolating the luminance component and the colordifference components in a reference image according to a motion vector;and a second generating unit configured to generate a decoded image byadding the predicted image and a prediction error that is acquired fromthe transform coefficient, wherein the first generating unit selects abi-directional prediction or a uni-directional prediction based on aprediction mode that is explicitly or implicitly designated, and if asize of a block, which is designated as a unit of the interpolation, isequal to or smaller than a first threshold value, and if thebi-directional prediction is selected, the first generating unit changesthe bi-directional prediction to the uni-directional prediction, andperforms the interpolation on the reference image to generate thepredicted image according to the motion vector.
 5. The image decodingapparatus according to claim 4, wherein if the size of the block, whichis designated as a unit of the interpolation, is equal to or smallerthan a second threshold value that is different from the first thresholdvalue, the first generating unit does not perform the uni-directionalprediction.
 6. The image decoding apparatus according to claim 4,wherein the predicted image is generated from two reference images ifthe bi-directional prediction is performed and generated from a singlereference image if the uni-directional prediction is performed.